package com.iengine.services.api.utils;

import java.io.IOException;
import java.io.InputStream;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;

public class SysConfigUtil {
	
	
	
	public static Properties prop= new Properties();
	static{
		init();
	}

	public static void main(String[] args) {
		new SysConfigUtil();
		System.out.println(getProp("dataserver_url"));
	}
	
	public static void init(){
		InputStream in = null;
		try {   
        	in = Thread.currentThread().getContextClassLoader().getResourceAsStream("conf/urlpath/urlConfig.properties"); 
            prop.load(in);  
        } catch (IOException e) {   
            e.printStackTrace();   
        }finally{
        	try {
        		if(in!=null)in.close();
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
        }
	}
	
	
	public static String getProp(String propName){
		return prop.getProperty(propName).trim();
	}
}
